package dao;

import entity.ClockRule;

import java.sql.*;
import java.util.ArrayList;
import java.util.List;

public interface ClockRuleDao {


     List<ClockRule> findAll() throws SQLException, ClassNotFoundException;


     ClockRule findById(Integer id) throws SQLException, ClassNotFoundException;


     boolean save(ClockRule rule) throws SQLException, ClassNotFoundException;

     boolean update(ClockRule rule) throws SQLException, ClassNotFoundException;


     boolean delete(Integer id) throws SQLException, ClassNotFoundException;

     boolean toggleStatus(Integer id, Boolean active) throws SQLException, ClassNotFoundException;

     ClockRule extractRuleFromResultSet(ResultSet rs) throws SQLException;

     public List<ClockRule> findActiveRules() throws SQLException, ClassNotFoundException;
}
